package com.zs.toolbox.web2j.system.core.controller.admin;


import com.zs.toolbox.web2j.common.request.WtPageBodyModel;
import com.zs.toolbox.web2j.common.request.WtPageQuerySearchModel;
import com.zs.toolbox.web2j.common.response.WtBaseResponse;
import com.zs.toolbox.web2j.common.web.WtAdminBaseController;
import com.zs.toolbox.web2j.system.core.entity.WtDictionaryTypeEntity;
import com.zs.toolbox.web2j.system.core.service.WtDictionaryTypeService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 字典类型表 前端控制器
 * </p>
 *
 * @author eric.zhang
 * @since 2018-10-08
 */
@RestController
@RequestMapping(value = "/api/v1/admin/dictionary/type")
@Api("后台公共字典分类管理接口")
public class WtAdminDictionaryTypeController extends WtAdminBaseController<WtDictionaryTypeService, WtDictionaryTypeEntity,String> {
    @Override
    public WtBaseResponse<WtPageBodyModel<WtDictionaryTypeEntity>> getPage(@RequestBody WtPageQuerySearchModel wtPageQueryModel) {
        wtPageQueryModel.setSearchKey(getTableField(WtDictionaryTypeEntity.class,wtPageQueryModel.getSearchKey()));
        return super.getPage(wtPageQueryModel);
    }
}
